import service from '@/util/request'
import apis from './api'
const api = {};
let baseUrl = 'CheckupAdmin';
for (let k in apis) {
  api[k] = function (params) {
    if (apis[k].type === 'post') {
      return service({
        url: baseUrl + apis[k].url,
        method: apis[k].type,
        data: params
      })
    } else {
      return service({
        url: baseUrl + apis[k].url,
        method: apis[k].type,
        params: params
      })
    }
  }
}
export default api
